package cn.shengchao.examstar.rpc.wecom.cs;

/**
 * @program: examstarapi
 * @description: 调企业微信的锁常量定义
 * @author: Xiong weiqiang
 * @create: 2025-04-15 11:40
 */
public interface WeComLockCs {
    String PREFIX_LOCK_KEY_FOR_USER_SINGLE_CONCAT_ME = "CONCAT_ME_SINGLE_LOCK:";
    String PREFIX_QYWX_USER_SINGLE_QRCODE = "QYWX_USER_SINGLE_QRCODE:";
    String PREFIX_QYWX_CS_GROUP_USERS = "QYWX_CS_GROUP_USERS:";
    String PREFIX_QYWX_INVITER_GROUP_USERS = "QYWX_INVITER_GROUP_USERS:";

    static String getLockKeyForUserSingleConcatMe(String userId,String state){
        return PREFIX_LOCK_KEY_FOR_USER_SINGLE_CONCAT_ME + userId + ":" + state;
    }

    static String getRedisKeyForUserSingleConcatMe(String userId,String state){
        return PREFIX_QYWX_USER_SINGLE_QRCODE + userId + ":" + state;
    }
    static String getRedisKeyForCsGroupUsers(String groupId){
        return PREFIX_QYWX_CS_GROUP_USERS + groupId;
    }
    static String getRedisKeyForInviterGroupUsers(String groupId){
        return PREFIX_QYWX_INVITER_GROUP_USERS + groupId;
    }
}